//package ui.forms;
//
//import com.sun.lwuit.*;
//import com.sun.lwuit.animations.CommonTransitions;
//import com.sun.lwuit.animations.Transition;
//import com.sun.lwuit.events.ActionEvent;
//import com.sun.lwuit.layouts.*;
//import ui.CategorySelectionListener;
//import ui.CategorySelector;
//import ui.DateButton;
//import ui.FoodSelector;
//
///**
// *
// * @author Shayan
// */
//public class DiaryForm extends Form implements CategorySelectionListener {
//
//    DateButton btnDate;
//    CategorySelector categorySelector;
//    Transition slideOut;
//    Transition slideIn;
//
//    public DiaryForm(final Form parent) {
//        setTitle("Diary");
//        setLayout(new BorderLayout());
//
//        slideOut = CommonTransitions.createSlide(CommonTransitions.SLIDE_HORIZONTAL, false, 500);
//        slideIn = CommonTransitions.createSlide(CommonTransitions.SLIDE_HORIZONTAL, true, 500);
//
//        Command cmdBack = new Command("Back") {
//
//            public void actionPerformed(ActionEvent evt) {
//                parent.showBack();
//            }
//        };
//        this.setBackCommand(cmdBack);
//        this.addCommand(cmdBack);
//
//        categorySelector = new CategorySelector();
//        categorySelector.setCategorySelectionListener(this);
//        addComponent(BorderLayout.CENTER, categorySelector);
//
//    }
//    FoodSelector foodSelector;
//
//    public void categorySelected(String categoryID) {
//        foodSelector = new FoodSelector(categoryID);
//
//        replaceAndWait(categorySelector, foodSelector, slideOut);
//    }
//}
